<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script>
            class Father {
                constructor(name, age) {
                    ;(this.name = name), (this.age = age)
                }
                sayHi() {
                    console.log('sayhi~ ')
                }
            }

            class Son extends Father {
                constructor(name, age) {
                    super(name, age)
                }
                dance() {
                    console.log('我会跳舞')
                }
            }

            let wqq = new Son('吴倩倩', '18')
            console.log(wqq)
            console.dir(wqq)
            wqq.dance()
            wqq.sayHi() //爸爸的原型
            console.log(wqq.toString) //爸爸原型的原型对象
        </script>
    </body>
</html>
